-- local H = require "packages/new_heg/util"
-- local U = require "packages/utility/utility"
-- local extension = Package:new("hidden")
-- extension.extensionName = "hegemony_diy"
-- extension.game_modes_whitelist = { 'nos_heg_mode', 'new_heg_mode' }

-- Fk:loadTranslationTable{
--   ["hidden"] = "隐藏",
-- }

-- local duyu = General(extension, "hidden__duyu", "n_pigeon", 3)
-- duyu.hidden = true
-- local shujian = fk.CreateTriggerSkill{
--   name = "hidden__shujian",
--   anim_type = "drawcard",
--   events = {fk.CardUseFinished},
--   can_trigger = function(self, event, target, player, data)
--     if target ~= player or not player:hasSkill(self) then return false end
--     local card_type = data.card.type
--     local room = player.room
--     local logic = room.logic
--     local use_event = logic:getCurrentEvent()
--     local mark_name = "hidden__shujian_" .. data.card:getTypeString() .. "-turn"
--     local mark = player:getMark(mark_name)
--     if mark == 0 then
--       logic:getEventsOfScope(GameEvent.UseCard, 1, function (e)
--         local last_use = e.data[1]
--         if last_use.from == player.id and last_use.card.type == card_type then
--           mark = e.id
--           room:setPlayerMark(player, mark_name, mark)
--           return true
--         end
--         return false
--       end, Player.HistoryTurn)
--     end
--     return mark == use_event.id
--   end,
--   on_use = function(self, event, target, player, data)
--     local room = player.room
--     local targets = table.map(room.alive_players, Util.IdMapper)
--     local tos = room:askForChoosePlayers(player, targets, 1, 1, "#hidden__shujian_draw", self.name, false)
--     local to = room:getPlayerById(tos[1])
--     to:drawCards(1, self.name)
--     room:addPlayerMark(player, "hidden__shujian_times-turn", 1)
--     if player:getMark("hidden__shujian_times-turn") < 3 then
--       room:askForDiscard(to, 1, 1, true, self.name, false)
--     else
--       H.doHideGeneral(room, player, player, self.name)
--     end
--   end,
-- }

-- local xiulv = fk.CreateTriggerSkill{
--   name = "hidden__xiulv",
--   anim_type = "special",
--   events = {fk.EventPhaseStart, fk.AfterCardsMove},
--   can_trigger = function(self, event, target, player, data)
    
--   end,
--   on_use = function(self, event, target, player, data)
    
--   end,
-- }

-- -- local pozhu = fk.CreateTargetModeSkill{

-- -- }

-- -- duyu:addCompanions("hidden__yanghu")
-- duyu:addSkill(shujian)
-- duyu:addSkill(xiulv)
-- -- duyu:addSkill(pozhu)
-- Fk:loadTranslationTable{
--   ["hidden__duyu"] = "隐藏武将",
--   ["#hidden__duyu"] = "",
--   ["designer:hidden__duyu"] = "",
--   ["illustrator:hidden__duyu"] = "",

--   ["hidden__shujian"] = "隐藏",
--   [":hidden__shujian"] = "隐藏",
--   ["hidden__xiulv"] = "隐藏",
--   [":hidden__xiulv"] = "隐藏",
--   ["hidden__pozhu"] = "隐藏",
--   [":hidden__pozhu"] = "隐藏",

--   ["#hidden__shujian_draw"] = "隐藏",

--   -- ["$hidden__shujian1"] = "彭蠡雁惊，此诚平吴之时。",
--   -- ["$hidden__shujian2"] = "奏三陈之诏，谏一国之弊。",
--   -- ["$hidden__xiulv1"] = "潮起万丈之仞，可阻江南春风。",
--   -- ["$hidden__xiulv2"] = "缮甲兵，耀威武，伐吴指日可待。",
--   -- ["~hidden__duyu"] = "六合即归一统，奈何寿数已尽……",
-- }

-- return extension
